home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group95b.txt / 000070_icon-group-sender _Mon Jun 26 17:08:50 1995.msg < prev    next >
Internet Message Format  |  1995-09-18  |  5KB

  1. Received: by cheltenham.cs.arizona.edu; Sat, 8 Jul 1995 10:57:50 MST
  2. Subject: problem building icon 9.0 under unixware 2.01
  3. To: pacbell!cs.arizona.edu!icon-group@pacbell.com
  4. Date: Mon, 26 Jun 1995 17:08:50 -0700 (PDT)
  5. From: "Mike LeRoy" <mslbrb!mike@pacbell.com>
  6. Cc: mike@gw.PacBell.COM (Mike LeRoy)
  7. X-Mailer: ELM [version 2.4 PL23]
  8. Mime-Version: 1.0
  9. Content-Type: text/plain; charset=US-ASCII
  10. Message-Id: <2fef4c130.6ae7@mslbrb>
  11. Content-Transfer-Encoding: 7bit
  12. Content-Length: 4437
  13. Errors-To: icon-group-errors@cs.arizona.edu
  14.  
  15. hi,
  16.  
  17.    I've been trying to build icon v9 under UnixWare 2.01 for a while
  18.    and have come up with a probem in the data.r and other *.r. with
  19.    the D_Integer, D_Null construction.
  20.  
  21.    Here's the sample chunks in 1 piece to cause the error:
  22.  
  23. - - - - cut here - - - - - - - - -
  24.  
  25. /*
  26.  * try to show problem under UnixWare 2.01
  27.  *
  28.  */
  29.  
  30. /*
  31.  * from typdefs.h
  32.  */
  33.  
  34. #if IntBits != WordBits
  35. typedef long int word;
  36. typedef unsigned long int uword;
  37. #else                                   /* IntBits != WordBits */
  38. typedef int word;
  39. #ifdef CDC_VXVE
  40. typedef uword;
  41. #else                                   /* CDC_VXVE */
  42. typedef unsigned int uword;
  43. #endif                                  /* CDC_VXVE */
  44. #endif                                  /* IntBits != WordBits */
  45.  
  46. typedef int (*fptr)();
  47. typedef struct descrip *dptr;
  48.  
  49. typedef word C_integer;
  50.  
  51. /*
  52.  * from rstructs.h
  53.  */
  54.  
  55.  
  56. struct descrip {                /* descriptor */
  57.    word dword;                  /*   type field */
  58.    union {
  59.       word integr;              /*   integer value */
  60.       char *sptr;               /*   pointer to character string */
  61.       union block *bptr;        /*   pointer to a block */
  62.       dptr descptr;             /*   pointer to a descriptor */
  63.       } vword;
  64.    };
  65.  
  66. /*
  67.  * from config.h
  68.  */
  69.  
  70. #ifndef WordBits
  71. #define WordBits 32
  72. #endif                                  /* WordBits */
  73.  
  74. #ifndef IntBits
  75. #define IntBits WordBits
  76. #endif                                  /* IntBits */
  77.  
  78. /*
  79.  * from cpuconf.h
  80.  */
  81.  
  82. #if WordBits == 64
  83.  
  84. #ifndef MinLong
  85. #define MinLong  ((long int)0x8000000000000000) /* smallest long integer */
  86. #endif
  87.  
  88. #ifndef MaxLong
  89. #define MaxLong  ((long int)0x7fffffffffffffff) /* largest long integer */
  90. #endif
  91.  
  92. #define MaxStrLen 017777777777L /* maximum string length */
  93.  
  94. #ifndef MaxNegInt
  95. #define MaxNegInt "-9223372036854775808"
  96. #endif
  97.  
  98. #ifndef F_Nqual
  99. #define F_Nqual 0x8000000000000000      /* set if NOT string qualifier */
  100. #endif                                  /* F_Nqual */
  101. #ifndef F_Var
  102. #define F_Var   0x4000000000000000      /* set if variable */
  103. #endif                                  /* F_Var */
  104. #ifndef F_Ptr
  105. #define F_Ptr   0x1000000000000000      /* set if value field is pointer */
  106. #endif                                  /* F_Ptr */
  107. #ifndef F_Typecode
  108. #define F_Typecode  0x2000000000000000  /* set if dword includes type code */
  109. #endif                                  /* F_Typecode */
  110.  
  111. #endif                                  /* WordBits == 64 */
  112.  
  113. /*
  114.  * 32-bit words.
  115.  */
  116.  
  117. #if WordBits == 32
  118.  
  119. #define MaxLong  ((long int)017777777777L)   /* largest long integer */
  120. #define MinLong  ((long int)020000000000L)   /* smallest long integer */
  121.  
  122. #define MaxNegInt "-2147483648"
  123.  
  124. #define MaxStrLen            0777777777 /* maximum string length */
  125.  
  126. #define F_Nqual 0x80000000              /* set if NOT string qualifier */
  127. #define F_Var   0x40000000              /* set if variable */
  128. #define F_Ptr   0x10000000              /* set if value field is pointer */
  129. #define F_Typecode  0x20000000  /* set if dword includes type code */
  130. #endif                                  /* WordBits == 32 */
  131.  
  132. /*
  133.  * from rmacros.h
  134.  */
  135.  
  136. #define T_Null           0      /* null value */
  137. #define T_Integer        1      /* integer */
  138.  
  139. #define D_Typecode      (F_Nqual | F_Typecode)
  140.  
  141.  
  142. #define D_Null          (T_Null     | D_Typecode)
  143. #define D_Integer       (T_Integer  | D_Typecode)
  144.  
  145.  
  146. struct descrip kywd_err = {D_Integer};  /* &error */
  147. struct descrip kywd_pos = {D_Integer};  /* &pos */
  148.  
  149. struct descrip x_x = {T_Integer};
  150. struct descrip y_y = {D_Typecode};
  151. struct descrip z_z = {F_Nqual};
  152. struct descrip w_z = {F_Typecode};
  153. - - - - cut here - - - - - - - - -
  154.  
  155. the output of cc:
  156.  
  157.  
  158. UX:acomp: WARNING: "prob.c", line 122: initializer does not fit: 0xa0000001
  159. UX:acomp: WARNING: "prob.c", line 123: initializer does not fit: 0xa0000001
  160. UX:acomp: WARNING: "prob.c", line 126: initializer does not fit: 0xa0000000
  161. UX:acomp: WARNING: "prob.c", line 127: initializer does not fit: 0x80000000
  162. Undefined            first referenced
  163.  symbol                  in file
  164. main                                /usr/ccs/lib/crt1.o
  165. UX:ld: ERROR: a.out: fatal error: Symbol referencing errors. No output written to a.out
  166.  
  167. - - - - -
  168.  
  169. the solution I think is to change typedef int word -> typedef unsigned word
  170.  
  171. What other problems have I caused by doing this?
  172.  
  173.  
  174. mike
  175.  
  176. -- 
  177. Mike LeRoy  4909 Sea Wolf Drive  Santa Rosa, CA 95409-3526
  178. pacbell.com!mslbrb!mike               voice (707) 538-7832
  179.  
  180.